Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext


~Tate Reponekonylen 14.Jan.04 07:07 PM a Web browser
Domino Server 6.0.2 CF2 iSeries


I have a login and dologin page when the user enter the a wrong password/username i want to come back to the login page. now it goes to the home .jsp page. but on the server console i get invalid usernae and password notes ecxeption error . can anyone help me?/

Login Page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>

<%@ taglib uri="/WEB-INF/domutil.tld" prefix="domutil" %>
<%@ page
language="java"
contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
%>
<TITLE>Log In</TITLE>
</HEAD>
<BODY>
<form method="POST" action="index.jsp?link=Discussion/doLogin.jsp">

<domutil:if>
<domutil:condition debug="true" onfailure="exception">
<%= request.getParameter("lf") != null%>
</domutil:condition>
<left><font=red><b>Login Failure!</b></font></left>
<p>
</domutil:if>

<domutil:if>
<domutil:condition>
<%= request.getParameter("ar") != null%>
</domutil:condition>
<center><b>Authorization Required. Please Log In.</b></center>
<p>
</domutil:if>


<TABLE border="0">
<TBODY>
<TR>
<TD>Username:</TD>
<TD><input type="text" name="username"></TD>
</TR>
<TR>
<TD>Password:</TD>
<TD><input type="password" name="password"></TD>
</TR>
</TBODY>
</TABLE>
<input type="submit" value="Log In">
</form>
</BODY>
</HTML>




doloin page:

<% try {
String username = request.getParameter("username");
System.out.println("username:" + username);
String password = request.getParameter("password");
System.out.println("password:" + password);

%>

<domino:db host="" dbname="Table"
dbserver="Test"
user="<%=username%>"
password="<%=password%>">

<% // Store the username into session context
session.setAttribute("l_fullname", request.getParameter("username"));
session.setAttribute("l_user", request.getParameter("username"));
session.setAttribute("l_pw", request.getParameter("password"));
session.setAttribute("l_admin", "0");
%>

<domino:ifdbrole name="Admin">
<% session.setAttribute("l_admin", "1"); %>
</domino:ifdbrole>

</domino:db>


<%
response.sendRedirect("index.jsp/home.jsp");

} catch (Exception e) {
// flush current login info
session.setAttribute("l_user", null);
session.setAttribute("l_pw", null);
session.setAttribute("l_admin", null);
response.sendRedirect("login.jsp?lf=1");


}
%>








  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS